import json
fr = open("天气预报json.txt","r",encoding='utf-8')
i = json.load(fr)
j = json.dumps(i)
k = json.loads(j)
print()


def printThreeDays(future):
    print(type(future))
    for i in range(3):
        day = future[i]
        #print("date：{}\nweather：{}\ndirect：{}\nwid:night{}\n,wid:day:{}\ntemperature:{}".format(day["date"]))
        print("第"+str(i)+"天")
        print("temperature"+day["temperature"])
        print("date"+day["date"])
        print("weather"+day["weather"])
        print("direct"+day["direct"])
        print("wid:day:"+day["wid"]["day"])
        print("wid:night:"+day["wid"]["night"])
        print("\n")
        
        

printThreeDays(k["result"]["future"])
    
        
